#if !defined(AFX_ELEMMOVE_H__C777A435_F193_4A8D_828F_8A9867CCB3CB__INCLUDED_)
#define AFX_ELEMMOVE_H__C777A435_F193_4A8D_828F_8A9867CCB3CB__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ElemMove.h : header file
//
#include "Ch_Op_St.h"
#include "TecCycConfirm.h"
/////////////////////////////////////////////////////////////////////////////
// CElemMove dialog

class CElemMove : public CDialog
{
// Construction
public:
	CButton m_btnResetTrip;
	CElemMove(CWnd* pParent = NULL);	// standard constructor
	~CElemMove();						// standard destructor
	CImageList		*m_pImageHdrSmall;
	CImageList		*m_pImageList;
	CImageList		*m_pImageListSmall;
	CWinThread		*m_pMoverThread;
	CTecCycConfirm	*m_pTCConf;
	CCh_Op_St		*m_ChDlg;
	int				m_loggedUser;
	bool			m_phasConfirmed;
	int				m_op_view;

	//Funzioni di update della finestra.//
	void ElemListUpdate(int opToUpdate);
	void CenterElemList(int numOp);
	void ElemEditUpdate(int type);
	void TCOpListUpdate();
	void ActivateControls();
	bool CheckUser();
	void CenterTCOpList(int numOp);
	
	//Message handlers for user messages//
	LRESULT OnOpStarted(WPARAM wParam, LPARAM lParam);
	LRESULT OnOpFinished(WPARAM wParam, LPARAM lParam);
	LRESULT OnOpBreak(WPARAM wParam, LPARAM lParam);
	LRESULT OnOpFailed(WPARAM wParam, LPARAM lParam);
	LRESULT OnOpPhFinished(WPARAM wParam, LPARAM lParam);
	LRESULT OnSfrCheck(WPARAM wParam, LPARAM lParam);
	LRESULT OnSfrCheckTO(WPARAM wParam, LPARAM lParam);
	LRESULT OnSfrCheckOK(WPARAM wParam, LPARAM lParam);
	LRESULT OnTcConfirmed(WPARAM wParam, LPARAM lParam);
	LRESULT OnOpStopped(WPARAM wParam, LPARAM lParam);
	LRESULT OnUpdateSeq(WPARAM wParam, LPARAM lParam);
	LRESULT OnOpInProg(WPARAM wParam, LPARAM lParam);
	LRESULT OnOpRefresh(WPARAM wParam, LPARAM lParam);
	LRESULT OnPhExit(WPARAM wParam, LPARAM lParam);

	//Controllo password di un utente//
	bool CheckUserPassword(char *userName, char *userPwd);
	
// Dialog Data
	//{{AFX_DATA(CElemMove)
	enum { IDD = IDD_ELEM_MOVE };
	CButton	m_btnResetTask;
	CButton	m_PhysConfirm;
	CButton	m_AbortTc;
	CProgressCtrl	m_ProBarTc;
	CListCtrl	m_ListTCOp;
	CButton	m_SelOp;
	CButton	m_StopOp;
	CButton	m_Start;
	CListCtrl	m_MicroList;
	CString	m_Camp;
	CString	m_CurrOp;
	CString	m_DPC;
	CString	m_DVC;
	CString	m_Obj;
	CString	m_Objt;
	CString	m_NumOp;
	CString	m_SPC;
	CString	m_SVC;
	CString	m_TecCyc;
	CString	m_OpMode;
	CString	m_Status;
	CString	m_UsedEq;
	CString	m_VirtCoord;
	CString	m_SetPoint2;
	CString	m_SetPoint1;
	CString	m_Res2;
	CString	m_Res1;
	CString	m_PhysCoord;
	BOOL	m_chkStopNext;
	CString	m_sysStatus;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CElemMove)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CElemMove)
	virtual BOOL OnInitDialog();
	afx_msg void OnStart();
	virtual void OnCancel();
	afx_msg void OnStopOp();
	afx_msg void OnSelOp();
	afx_msg void OnDblclkElemList(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnPhConfirm();
	afx_msg void OnAbortTc();
	afx_msg void OnChkStopNext();
	afx_msg void OnDestroy();
	afx_msg void OnResetTrip();
	afx_msg void OnResetTask();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_ELEMMOVE_H__C777A435_F193_4A8D_828F_8A9867CCB3CB__INCLUDED_)
